<?php
/**
 * @var \workin\modules\increment\models\CarInvonceVerifyHuirong $model
 */
if ($model->carInvonceVerifyHuirongBack){
    $b1 = $model->carInvonceVerifyHuirongBack;
    $b2 = $b1->query_result;
    $b3 = json_decode($b2);
    $b4 = \common\components\tools\Tools::objectToArray($b3);
    $back = $b4;
}else{
    throw new ErrorException("没有找到关联数据", 1081);
}
$k_attr = [
    'reportId' => "报告编号",
    'picType' => "图片类型",
    'basicInfo' => "车辆登记证的基本信息结构",
    'vehicleInvoiceIssueDate' => "开票日期",
    'vehicleInvoiceCode' => "发票代码",
    'vehicleInvoiceNumber' => "发票号码",
    'vehicleInvoiceBuyer' => "购买方名称",
    'vehicleInvoiceBuyerId' => "购买方身份证/组织证件号",
    'carType' => "车辆类型",
    'vehicleInvoiceCarModel' => "厂牌型号",
    'vehicleInvoiceCertId' => "合格证号",
    'carImportCertifition' => "进口证明书号",
    'carInspectionNumber' => "商检单号",
    'vehicleInvoiceEngineId' => "发动机号",
    'vehicleInvoiceCarVin' => "车辆识别代号/车架号",
    'vehicleInvoiceTotalPrice' => "价税合计",
    'vehicleInvoiceDealer' => "销货单位名称",
    'taxpayerNumber' => "纳税人识别号",
    'vehicleInvoiceTaxAmount' => "增值税额",
    'vehicleInvoicePriceWithoutTax' => "不含税价",
    'internetInvoiceNumber' => "网络发票号",
    'validationResult' => "购车发票验证结果结构",
    'sourceCode' => "验证结果编码 车辆合格证真假验证",
    'sourceContent' => "验证结果内容 车辆合格证真假验证",
    'queryResults' => "是否匹配的字段",
    'taxpayerIdentityNumber' => "纳税",
    'billDate' => "",
    'totalAmount' => "价税",
    'drawerName' => "开",
    'buyerName' => "购货",
];
$out = [];
\common\components\tools\Out::bo_array($b4, $out, $k_attr);
?>

<div class="increment-default-civ-query-result">
    <div class="row">
        <div class="col-lg-12">
            <table class="table table-condensed table-bordered">
                <thead>
                <tr>
                    <th>键名</th>
                    <th>说明</th>
                    <th>值</th>
                </tr>
                </thead>
                <tbody>
                <?php foreach ($out as $k => $v): ?>
                    <?php
                    $x = "";
                    for ($i = 1; $i < $v['deep']; $i++){
                        $x .= "|--";
                    }
                    ?>
                    <tr>
                        <td width="250px;"><?=$x.$v['k'] ?></td>
                        <td width="250px"><?=$v['attr'] ?></td>
                        <td><?=$v['v'] ?></td>
                    </tr>
                <?php endforeach; ?>
                </tbody>
            </table>
        </div>
    </div>
</div>


